package vip.liux.contracts.shared.enums.product;

import vip.liux.core.enums.IEnum;

public enum CategoryLevel implements IEnum {
    // 0:一级类目,1:二级类目,2:三级类目
    FIRST(0, "一级类目"),
    SECOND(1, "二级类目"),
    THIRD(2, "三级类目");
    final int value;
    final String desc;

    CategoryLevel(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    @Override
    public int getValue() {
        return value;
    }

    @Override
    public String getDesc() {
        return desc;
    }

    public static CategoryLevel getNext(CategoryLevel level) {
        return values()[(level.ordinal() + 1) % values().length];
    }
}
